package com.benben.springSecurity.dao;

import com.benben.springSecurity.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface IUserDao extends JpaRepository<User,Long> {

    @Query(value = "select * from user p where p.username = ?1", nativeQuery = true)
    List<User> findByName(String username);


}
